
DIR = sphinx4-1.0beta4
ZIP_FILE = $(DIR)-src.zip
ZIP_URL = http://sourceforge.net/projects/cmusphinx/files/sphinx4/1.0%20beta4/$(ZIP_FILE)/download

all: sphinx4

sphinx4:
	wget $(ZIP_URL)
	mkdir -p src
	unzip -d src $(ZIP_FILE)
	rm $(ZIP_FILE)
	echo "Installing Java Speech API...  (Hint: if you scroll past your chance to accept the license you'll need run \"sh ./lib/jsapi.sh\")"
	cd src/$(DIR)/lib && chmod 755 ./jsapi.sh && sh ./jsapi.sh
	cd src/$(DIR) && ant

clean:
	rm -rf src
